#ifndef NetConsole_H
#define NetConsole_H

#include <stdio.h>
#include <string.h>
#include <string>
#include "NetworkIDObject.h"
#include "NetworkIDManager.h"
#include "MessageIdentifiers.h"
#include "RakNetworkFactory.h"
#include "RakPeerInterface.h"
#include "RakNetTypes.h"
#include "BitStream.h"

#define MAX_CLIENTS 10
#define SERVER_PORT 60000


// Define our custom message ID's
enum {
	ID_USER_SERVERAPPLE_CREATED = ID_USER_PACKET_ENUM+1
};

class NetConsole : public NetworkIDObject {
public:
	NetConsole();
	~NetConsole();
	bool createServer(std::string & addr);
	bool connectTo(const std::string & addr);
	bool update();
	std::string address;
	std::string msg;
	std::string output;
	char rpc[512];
	void __cdecl PrintMessage(RPCParameters *rpcParameters);

private:
	RakPeerInterface *peer;
	bool isServer;
	bool prompt;
	Packet *packet;
	NetworkIDManager serverNetworkIDManager;
	NetworkIDManager clientNetworkIDManager;
};

#endif